#include "stdafx.h"
#include "CppUnitTest.h"

using namespace Microsoft::VisualStudio::CppUnitTestFramework;
using namespace std;
using namespace MathFunction;

namespace TryTest
{		
	TEST_CLASS(UnitTest1)
	{
	public:
		
		TEST_METHOD(TestGetPrimeList)
		{
			Prime p(100);

			int primes[25] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,
							  43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};
			std::vector<int> primes_test = p.GetPrimeList();

			Assert::AreEqual((int)primes_test.size(), 25);

			for (int i = 0; i < 25; i ++)
			{
				Assert::AreEqual(primes[i], primes_test[i]);
			}
		}

	};
}